package com.afei.java.ai.langchain4j.assisant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

/**
 * @Title: AFeiAgent
 * @Author wangyf
 * @Package com.afei.java.ai.langchain4j.assisant
 * @Date 2025/4/24 16:09
 * @description: 1
 */

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        streamingChatModel = "qwenStreamingChatModel",
        chatMemoryProvider= "chatMemoryProviderAFei",
        tools = "appointmentTools",
        contentRetriever = "contentRetrieverAfei")
public interface AFeiAgent {

    @SystemMessage(fromResource = "afei-prompt-med")
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String userMessage);
}
